﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AutomationHost.ViewModels.RunIndexPage>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Test Planing
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
        <a href="/Run/Home">Run a test plan</a> | <a href="/Run/Home/List">View Running</a></div>
    <table width="100%">
        <thead>
            <tr>
                <td>
                    Test Plans
                </td>
                <td>
                    Devices
                </td>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td style="width: 200px; vertical-align: top">
                    <%Html.RenderPartial("TestPlans", Model); %>
                </td>
                <td style="vertical-align: top">
                <form action="/Run/Home" method="post">
                <select name="testplans">
                <% foreach (var plan in Model.TestPlans) { %>
                    <option value="<%=plan.ID %>"><%=plan.Name %></option>
                <%} %>
                </select>
                    <%Html.RenderPartial("Devices", Model); %>
                    <input type="submit" value="Run Test Plan" />
                    </form>
                </td>
            </tr>
        </tbody>
    </table>
    <hr />
    <input type="button" value="Add a Product" />
</asp:Content>
